Skip to content

Commit

Permalink
Update nsIWebBrowserPersist.saveURI to be compatible with Firefox >= …
Browse files Browse the repository at this point in the history
…36.0
  • Loading branch information
danny0838 committed Jan 23, 2015
1 parent 492685c commit f6f2a3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/content/scrapbook/saver.js
Expand Up @@ -939,7 +939,9 @@ var sbContentSaver = {
var WBP = Components.classes['@mozilla.org/embedding/browser/nsWebBrowserPersist;1'].createInstance(Components.interfaces.nsIWebBrowserPersist);
WBP.persistFlags |= WBP.PERSIST_FLAGS_FROM_CACHE;
WBP.persistFlags |= WBP.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;
if ( sbCommonUtils._fxVer18 ) {
if ( sbCommonUtils._fxVer36 ) {
WBP.saveURI(aURL, null, this.refURLObj, null, null, null, targetFile, null);
} else if ( sbCommonUtils._fxVer18 ) {
WBP.saveURI(aURL, null, this.refURLObj, null, null, targetFile, null);
} else {
WBP.saveURI(aURL, null, this.refURLObj, null, null, targetFile);
Expand Down
4 changes: 4 additions & 0 deletions modules/common.jsm
Expand Up @@ -90,6 +90,10 @@ var sbCommonUtils = {
delete this._fxVer30;
return this._fxVer30 = (this.checkFirefoxVersion("30.0") >=0);
},
get _fxVer36() {
delete this._fxVer36;
return this._fxVer36 = (this.checkFirefoxVersion("36.0") >=0);
},

checkFirefoxVersion : function(ver) {
return this.checkVersion(this.FIREFOX_VERSION, ver);
Expand Down

0 comments on commit f6f2a3c

Please sign in to comment.